<html>
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title></title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="">
  </head>
  <script src="https://cdn.jsdelivr.net/npm/file-saver@2.0.5/dist/FileSaver.min.js"></script>
  <script src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
  <body>

      <div class="box">
        <p>下面是滚动内容</p>
        <div class="content"></div>
      </div>
    
    
 
      
    <script>
      // Create a new Blob object
      var blob = new Blob(['This is a sample text file. dddddd'], {type: 'text/plain'});
      // Use FileSaver API to save the blob
      saveAs(blob, 'sample_text_file.txt');
     
    </script>
  </body>
</html>